package com.bjpowernode.pay.service;

import com.bjpowernode.mvc.model.dto.user.TokenUserDTO;
import com.bjpowernode.pay.model.dto.KuaiQianFormDTO;
import org.springframework.data.redis.core.ZSetOperations;

import java.math.BigDecimal;
import java.util.Map;
import java.util.Set;

public interface PayService {

    //检查token与uid是否正确
    boolean checkToken(Integer userId, String token);


    //快钱支付,创建网银支付接口需要的参数
    KuaiQianFormDTO createApiResuestData(Integer uid, String token,BigDecimal money);


    //保存充值记录.
    int saveRecharge(Integer uid, String orderId, BigDecimal money);



    //将order存到redis中
    boolean saveOrderRedis(String orderId);



    //处理异步通知.
    String handLeKuaiQianNotify(String orderId, String payAmount, String payResult);


    //从redis中删除处理过的订单号
    void removeOrderIdRedis(String orderId);



    //从redis获取登录信息
    Map<String, String> getLoginTokenInfoFromRedis(String token);




    //从redis获取订单号
    Set<ZSetOperations.TypedTuple<String>> getOrderIdFromRedis();


    //调用快钱的查询接口
    String executeQueryOrder(String orderId);
}
